<?php

require_once('config.php');
require_once('../classes/class.city.inc.php');
$CALLBACK_FUNCTION = '';
$ARGUMENT = array();
if (isset($_GET['id'])) {
    $id = $_GET['id'];
    $filterArray = Array("TrimElement", "mysqlRealEscape");
    $id = $GENOBJ->filter($id, $filterArray);
    $CALLBACK_FUNCTION = 'getcity';
    $ARGUMENT['id'] = $id;
} else {
    $CALLBACK_FUNCTION = 'getcity';
    $ARGUMENT['id'] = '';
}

$cityObj = new city();
$RESPONSE = $cityObj->$CALLBACK_FUNCTION($ARGUMENT);
echo $RESPONSE;
exit;
?>